import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import ElementUI from 'element-ui';
import adver from '@/components/adver'
import course from '@/components/course'
import courseList from '@/components/courseList'
import addVideo from '@/components/addVideo'
import classesList from '@/components/classesList'
import teacher from '@/components/teacher'
import userList from '@/components/userList'
import userUpdate from '@/components/userUpdate'
import myData from '@/components/myData'
import login from '@/components/login'
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(Router)
Vue.use(ElementUI);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld,
      children:[{
        path: "/adver",
        name:adver,
        component: adver
      },{
        path: "/course",
        name:'course',
        component: course
      },{
        path: "/courseList",
        name: 'courseList',
        component: courseList
      },{
        path: "/addVideo",
        name: 'addVideo',
        component: addVideo
      },{
        path: "/classesList",
        name: 'classesList',
        component: classesList
      },{
        path: "/teacher",
        name: 'teacher',
        component: teacher
      }, {
          path: "/userList",
          name: 'userList',
          component: userList
        } ,{
          path: "/userUpdate",
          name: 'userUpdate',
          component: userUpdate
        },{
        path: "/myData",
        name: 'myData',
        component: myData
      },
      ]
    },
    {
      path:'/login',
      name: 'login',
      component: login
    }
  ]
})
